Skip to content

Instantly share code, notes, and snippets.

@robertwahler
robertwahler / FileIO.jslib
Created April 12, 2018 13:08
UnityEngine.PlayerPrefs wrapper for WebGL LocalStorage
var FileIO = {
SaveToLocalStorage : function(key, data) {
localStorage.setItem(Pointer_stringify(key), Pointer_stringify(data));
},
LoadFromLocalStorage : function(key) {
var returnStr = localStorage.getItem(Pointer_stringify(key));
var bufferSize = lengthBytesUTF8(returnStr) + 1;
var buffer = _malloc(bufferSize);
@btoone
btoone / curl.md
Last active May 11, 2024 05:35
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@parmentf
parmentf / GitCommitEmoji.md
Last active May 11, 2024 05:36
Git Commit message Emoji
@IsaacXen
IsaacXen / README.md
Last active May 11, 2024 05:32
(Almost) Every WWDC videos download links for aria2c.
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 11, 2024 05:32
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@parmentf
parmentf / ConventionalCommitsEmoji.md
Last active May 11, 2024 05:32
Emoji for Conventional Commits
Type Emoji code
feat :sparkles:
fix 🐛 :bug:
docs 📚 :books:
style 💎 :gem:
refactor 🔨 :hammer:
perf 🚀 :rocket:
test 🚨 :rotating_light:
build 📦 :package:
@sleeyax
sleeyax / stremio_discord_integration.md
Last active May 11, 2024 05:28
Stremio and Discord integration guide

Stremio and Discord integration

2023_07_08_15_03_33

Show your favorite movies, series and channels from Stremio to your friends on Discord!

⚡ Quick start

@karpathy
karpathy / stablediffusionwalk.py
Last active May 11, 2024 05:26
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@znechai
znechai / pluralize-ru.js
Last active May 11, 2024 05:24
JavaScript - Plural forms for russian words
/**
* Plural forms for russian words
* @param {Integer} count quantity for word
* @param {Array} words Array of words. Example: ['депутат', 'депутата', 'депутатов'], ['коментарий', 'коментария', 'комментариев']
* @return {String} Count + plural form for word
*/
function pluralize(count, words) {
var cases = [2, 0, 1, 1, 1, 2];
return count + ' ' + words[ (count % 100 > 4 && count % 100 < 20) ? 2 : cases[ Math.min(count % 10, 5)] ];
}